<%@ page  contentType="text/html; charset=UTF-8"%>
<%@ include file="../../public/public.jsp" %>

<% int rowColor = 1; 
	int pageSize = ((Integer)valueStack.findValue("pageForm.pageSize")).intValue();
	int pageNo = ((Integer)valueStack.findValue("pageForm.pageNo")).intValue();
	int rowNo = (pageNo-1)*pageSize+1;
%>
    <table border="0" width="100%" bgcolor="#999999" border="0" align="center" cellspacing="1" class="dataTableStyle"> 
    	<thead>
    	<s:if test="pagePosition.toLowerCase().equals('top') || pagePosition.toLowerCase().equals('all')">
    		<tr bgcolor="#FFFFFF">
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    		</s:if>
    		<tr height="20px" bgcolor="#A0C6E5">
    			<th align="center" width=5%"><font color="snow" size="2">序号</font></th>
    			<th align="center" width="15%"><font color="snow" size="2">工法名称</font></th>
    			<th align="center" width="18%"><font color="snow" size="2">主要完成单位</font></th>
    			<th align="center" width="9%"><font color="snow" size="2">工法级别</font></th>
    			<th align="center" width="9%"><font color="snow" size="2">工法编号</font></th>
    			<ss:condition rescode="ApprovedMethods" optcode="UPDATE||DELETE">
    			<th align="center" width="15%"><font color="snow" size="2">操作</font></th>
    			</ss:condition>
    		</tr>
    	</thead>
    	<tbody>
    		<s:set name="yearflag" value=""></s:set>
    		<s:iterator value="data">
    		<% if((rowColor++ %2)==0){ %>
    		<tr bgcolor="#F8F8F8" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%}else{ %>
    		<tr bgcolor="#FFFFFF" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%} %>
    			<s:if test="lawYear != #yearflag">
    				<s:set name="yearflag" value="lawYear"></s:set>
    				<td colspan="6"><font color="#0066ff" size="2"><s:property value="lawYear"/></font></td>
    				</tr>
    				<% if((rowColor++ %2)==0){ %>
    					<tr bgcolor="#F8F8F8" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    				<%}else{ %>
    					<tr bgcolor="#FFFFFF" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    				<%} %>
    			</s:if>
    			<th align="center"><font color="#0066ff" size="2">
    			<a href='javascript:goUpdate(<s:property value="id"/>)' style="cusor:hand">
    			<%=rowNo++ %></a>
    			</font></th>
    			<td align="center"><font color="#0066ff" size="2">
    			<a href='javascript:lookView(<s:property value="id"/>)' style="cusor:hand">
    				<s:property value="lawName"/>
    			</a> </font></td>
    			<td align="center"><font color="#0066ff" size="2"><s:property value="majorDep"/></font></td>
    			<td align="center"><font color="#0066ff" size="2">
    				<s:if test="levels==1">国家级</s:if>
    				<s:elseif test="levels==2">广东省</s:elseif>
    				<s:elseif test="levels==3">交通运输部</s:elseif>
    				<s:elseif test="levels==4">中交股份</s:elseif>
    				<s:elseif test="levels==5">四航局</s:elseif>
    			</font></td>
    			<td align="center"><font color="#0066ff" size="2"><s:property value="lawCode"/></font></td>
    				<ss:condition rescode="ApprovedMethods" optcode="UPDATE||DELETE">
    			<td align="center">
    				<ss:condition rescode="ApprovedMethods" optcode="UPDATE">
						<a href="javascript:goUpdate(<s:property value="id"/>)">修改</a>
					</ss:condition>
					&nbsp;&nbsp;&nbsp;
    				<ss:condition rescode="ApprovedMethods" optcode="DELETE">
						<a href="javascript:del(<s:property value="id"/>)">删除</a>
					</ss:condition>
    			</td>
					</ss:condition>
    			
    		 </tr>
    		</s:iterator>
    	</tbody>
		<tfoot>
    	<s:if test="pagePosition.toLowerCase().equals('buttom') || pagePosition.toLowerCase().equals('all')">
    		<tr bgcolor="#A0C6E5" height="20px">
    			<td colspan="20" height="20px">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    		</s:if>
    	</tfoot>
    </table>